import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/login/index.vue'
import Layout from '../views/layout/index.vue'
import Dashboard from '../views/dashboard/index.vue'
import Article from '../views/article/index.vue'

Vue.use(VueRouter)

const router = new VueRouter({
  routes: [
     {
      path:'/login',
      name:'Login',
      component:Login
     },
     {
      path:'/',
      name:'Layout',
      component:Layout,
      redirect:'/dashboard',
      children:[
        {
      path:'/dashboard',
      name:'Dashboard',
      component:Dashboard
        },
        {
      path:'/article',
      name:'Article',
      component:Article
        },
      ]

     },

  ]
})

export default router